#if !defined STUDENT_H
#define STUDENT_H

#include "User.h"
#include <string>

class Student:public User{
public:
	Student(string loginName="", string loginPassword="",string number="XXXXXXXXX",string name="XXX",string sex="",int age=0,string dept="δָ",
		string profession="δָ",string inclass="δָ",string enroltime="δָ",string gradutime="δָ",int borrowtime=30,int borrowcount=5,int borrowingcount=0,string telephone="00000000000");
    ~Student();
    string getNum();
    void setNum(string number);
    string getName();
    void setName(string name);
    string getSex();
    void setSex(string sex);
    int getAge();
    void setAge(int age);
    string getDept();
    void setDept(string dept);
    string getProfession();
    void setProfession(string profession);
    string getClass();
    void setClass(string inclass);
    string getEnrolTime();
    void setEnrolTime(string enroltime);
    string getGraduTime();
    void setGraduTime(string gradutime);
    int getBorrowTime();
    void setBorrowTime(int borrowtime);
    int getBorrowCount();
    void setBorrowCount(int borrowcount);
	int getBorrowingCount();
    void setBorrowingCount(int borrowingcount);
	string getTelephone();
    void setTelephone(string telephone);
	void SetStudent();
    void ShowStudent();

	void readFromFile(fstream &);
	void writeToFile(fstream &) const;
	friend istream& operator>>(istream &istrm, Student &student);
	friend ostream& operator<<(ostream &ostrm,const Student &student);

private:
    string stuNum;
    string stuName;
    string stuSex;
    int stuAge;
	string stuDept;
	string stuProfession;
	string stuClass;
    string stuEnrolTime;
    string stuGraduTime;
    int stuBorrowTime;
	int stuBorrowCount;
	int stuBorrowingCount;
	string stuTelephone;
};
#endif // STUDENT_H
